<template>
	<view class="share">
		<view :class="{'share-box': shareState}" @click="handleHiddenShare">
		</view>
		<view class="share-item" :class="{'share-show': shareState}">
			<view class="share-to">
				<text>{{descritp}}</text>
			</view>
			<view class="content" v-for="(item,index) in newList" :key="index">
				<view class="block">
					<view class="block_item">
						{{index+1}}.{{item.title}}
					</view>
					<view class="block_items" v-for=" j in item.content">
						<ul>
							<li>{{j}}</li>
						</ul>
					</view>
				</view>
			</view>
			
			
			<view class="cancel" @click.stop="handleHiddenShare">
				<text>确定</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
		  descritp: {
		    type: String,
		    default: '' // view|canvas
		  },
		  newList:{
			  type:Array,
			  default:[]
		  }
		},
		data() {
			return {

				shareState: false,
				
			};
		},
		methods: {
			// 显示分享
			handleShowShare() {
				this.shareState = true;
			},
			// 隐藏分享
			handleHiddenShare() {
				this.shareState = false;
			}
		}
	}
</script>

<style lang="less">
	.share {
		width: 100%;
		height: 100%;
	}

	.share-box {
		width: 100%;
		height: 100%;
		position: fixed;
		top: 0rpx;
		left: 0rpx;
		bottom: 0rpx;
		right: 0rpx;
		background-color: rgba(0, 0, 0, 0.4);
		transition: .3s;
		z-index: 999;
	}

	// 进入分享动画
	.share-show {
		transition: all 0.3s ease;
		transform: translateY(0%) !important;
	}

	// 离开分享动画
	.share-item {
		position: fixed;
		left: 0;
		bottom: 0;
		width: 100%;
		height: 590rpx;
		background-color: #FFFFFF;
		transition: all 0.3s ease;
		transform: translateY(100%);
		z-index: 1999;

		.share-to {
			width: 100%;
			height: 100rpx;
			display: flex;
			justify-content: center;
			align-items: center;

		}

		.content {
			width: 100%;
			height: 210upx;
			display: flex;
			flex-wrap: nowrap;


			.block {
				width: 100%;
				display: flex;
				justify-content: center;
				padding:  0 20rpx ;
				height: 260upx;
				flex-direction: column;
				flex-wrap: wrap;
				.block_item
				{
					color: black;
					
				}

				.block_items {}


			}
		}

		.cancel {
			width: 100%;

			display: flex;
			justify-content: center;
			align-items: center;
			border-top: 1rpx solid #E4E7ED;
		}
	}
</style>
